home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 September / CHIP Eylül 1998.iso / Slackwar / docs / Optical-Disk-HOWTO < prev    next >
Text File  |  1997-12-28  |  16KB  |  345 lines

  1.   Linux - Optical Disk HOWTO
  2.   Skip Rye, Skip_Rye@faneuil.com
  3.   v1.4, 22 December 1997
  4.  
  5.   This document describes the installation and configuration of optical
  6.   disk drives for Linux. Currently, the only drive covered well is the
  7.   Panasonic LF1000 PD Phase change optical drive with the SCSI-II inter¡
  8.   face. Please, if any one has experiences with optical storage under
  9.   Linux, send it and I will update it in SGML and forward it to the
  10.   Linux community.
  11.  
  12.   1.  Disclaimer
  13.  
  14.   Neither the author nor the distributors of this HOWTO are in any way
  15.   responsible for physical, financial, moral or any other type of damage
  16.   incurred by following the suggestions in this text.
  17.  
  18.   2.  Copyright
  19.  
  20.   The "Optical Disk-HOWTO" and "LF1000 mini-HOWTO" are copyrighted.
  21.  
  22.   2.1.  LF1000 mini-HOWTO
  23.  
  24.   (C) 1996,1997 by Skip Rye, abr@brspc_0064.msd.ray.com
  25.  
  26.   2.2.  Optical Disk-HOWTO
  27.  
  28.   (C) 1997 by Skip Rye, abr@brspc_0064.msd.ray.com
  29.  
  30.   Linux HOWTO documents may be reproduced and distributed in whole or in
  31.   part, in any medium physical or electronic, as long as this copyright
  32.   notice is retained on all copies. Commercial redistribution is allowed
  33.   and encouraged. The author, however, would like to be notified of any
  34.   such distributions. All translations, derivative works, or aggregate
  35.   works incorporating any Linux HOWTO documents must be covered under
  36.   this copyright notice. In other words, you may not produce a
  37.   derivative work from a HOWTO and impose additional restrictions on its
  38.   distribution.  Exceptions to these rules may be granted under certain
  39.   conditions. In short we wish to promote dissemination of this
  40.   information through as many channels as possible. However, we do wish
  41.   to retain copyright on the HOWTO documents, and would like to be
  42.   notified of any plans to redistribute the HOWTOs. Should you have any
  43.   questions, please contact Greg Hankins, the Linux HOWTO coordinator,
  44.   at gregh@sunsite.unc.edu.  You may finger his address for phone number
  45.   and additional contact information.
  46.  
  47.   3.  Phase Change Optical Technology
  48.  
  49.   3.1.  Introduction
  50.  
  51.   Optical Phase Change technology is used to create "In Phase" or "Out
  52.   of Phase" bits on a special media for phase change writing. The drive
  53.   uses a LASER of different power levels or LASER intensities to produce
  54.   this effect.  One power level allows the media to flow into a
  55.   crystalline form while the other creates an "Out of Phase" condition.
  56.   The crystallized areas reflect the read Lasers beam with a different
  57.   coefficient of reflectivity than the non-crystallized areas. Thus,
  58.   data can be read from the disk.
  59.  
  60.   What makes the phase change optical disk special is that it the disk
  61.   is formated with concentric cylinders or tracks with each track being
  62.   sectored much like a magnetic disk or read/write optical disk. The
  63.   tracks are very close so a lot of data can be stored on a disk. This
  64.   is different from a CD-ROM in that it gives your system the look and
  65.   feel of a magnetic disk. CD-ROMs have a spiraling track much like a
  66.   audio record. Having tracks and sectors alone would not make the phase
  67.   change drive special from optical disk but the drive has some very
  68.   special properties; The phase change drive allows for direct overwrite
  69.   of data which magneto optical can't do inexpensively and the media has
  70.   the very special property of NOT being susceptible to magnetic fields
  71.   or as sensitive to static discharge which gives the media a very long
  72.   shelf life.
  73.  
  74.   3.2.  Panasonic LF1000
  75.  
  76.   3.2.1.  POINTS OF INTEREST
  77.  
  78.   ╖  Read/Write optical disk.
  79.  
  80.   ╖  Can read CD-ROMs at 4X speed.
  81.  
  82.   ╖  Can read Kodak PhotoCDs.
  83.  
  84.   ╖  Media has a 15 Year shelf life.
  85.  
  86.   ╖  SCSI-2 Interface.
  87.  
  88.   ╖  Track/sector format as opposed to CD-ROMs spiraling record format.
  89.  
  90.   ╖  165ms access time - much better than a tape file restore.
  91.  
  92.   ╖  650Mb data storage per diskette.
  93.  
  94.   ╖  Diskettes are about $50 each.
  95.  
  96.   3.2.2.  THINGS YOU SHOULD KNOW
  97.  
  98.   ╖  Optical disk format not compatible with any other disk drive.
  99.  
  100.   ╖  Vendors don't seem to support UNIX very well - marketing is
  101.      targeted for DOS/Windows and Macintosh.
  102.  
  103.   ╖  Do NOT purchase the PD drive which uses the parallel port interface
  104.      - To my knowledge there is no Linux driver for it.
  105.  
  106.   3.2.3.  Installation
  107.  
  108.   The LF1000 is SCSI-2 compatible device. It features a block size of
  109.   512 bytes and is compatible with the Linux SCSI drivers. This drive
  110.   was installed on a PC compatible AMD 100MHZ 486 with an Adaptic 1542C
  111.   SCSI bus-master controller. To install and mount a disk the following
  112.   steps were taken;
  113.  
  114.   3.2.4.  Installation steps
  115.  
  116.   ╖  Install the drive and set the SCSI address to not interfere with
  117.      other SCSI devices. Reconnect all cabling.
  118.   ╖  Boot the computer. Your SCSI controller should note the new drive.
  119.  
  120.   ╖  During the Linux kernel boot, you should see an additional SCSI
  121.      device. In my case, having a magnetic system disk for device
  122.      /dev/sda it shows up as /dev/sdb.
  123.  
  124.   ╖  I did NOT partition the device because fdisk issued an overwrite
  125.      warning and I did not want to change anything from a dosemu
  126.      standpoint.
  127.  
  128.   ╖  mkfs -t ext2 /dev/sdb
  129.  
  130.   ╖  mkdir /pd
  131.  
  132.   ╖  mount -t ext2 -o ro,suid,dev,exec,auto,nouser,async /dev/sdb /pd -
  133.      Read only
  134.  
  135.   ╖  mount -t ext2 -o defaults /dev/sdb /pd - Mount drive W/R
  136.  
  137.   Your ready to "Rock'n'Roll"
  138.  
  139.   3.2.5.  Usage hints
  140.  
  141.   ╖  The media which comes with the drive is reported be re-writable
  142.      about 500,000 times. This means that it is not advisable to install
  143.      a live operating system such as Linux on the phase change optical
  144.      drive. These live operating systems tend to cache processes to and
  145.      from disk. Over time this can easily approach the phase change
  146.      media life.
  147.  
  148.   ╖  Mount drive read only as much as possible.
  149.  
  150.   ╖  When writing to the drive do so in large chunks. This will help
  151.      reduce any file fragmentation which will require more read seeks.
  152.  
  153.   ╖  This is however an excellent media for backups, gifs, mpeg or
  154.      storing large programs which you don't use that often. The restore
  155.      from backup is much faster that tape. Backups can be performed
  156.      using the cp -rp command without the need for the ftape driver.
  157.      This however, will replace symbolic links with the actual file.
  158.  
  159.   ╖  If while using the PD for writing, You find that the file you just
  160.      wrote to the disk are not there, chances are that the disk write
  161.      protect tab is in write protect mode and you mounted it in
  162.      read/write mode.
  163.  
  164.   3.3.  Additional Configuration concerns by Jeff Rooze
  165.  
  166.   Hello,
  167.  
  168.   I read your article on configuring the Panasonic LF-1000 for Linux. I
  169.   have configured my system so that the optical drive has its own device
  170.   name and the CD-ROM has its own device name.  This has allowed me to
  171.   mount either media at any time. I do not require any media in the
  172.   drive when I boot Linux. Also I am using the optical drive as an ext2
  173.   formatted media.
  174.  
  175.   I had a couple of minor difficulties in doing so.
  176.  
  177.   First, I had configured my hard drive at SCSI ID 6 and my PD at SCSI
  178.   ID 4. (I wanted to have the hard drive at a higher priority that the
  179.   PD). This caused a problem with the Linux SCSI driver. The driver
  180.   scans the SCSI devices from the Lower SCSI id's to the higher (eg: 0
  181.   .. 6).  Consequently my logical device names were assigned differently
  182.   depending on which type of media was installed in the PD drive. This
  183.   caused a big problem. My Linux partition is on my SCSI hard drive and
  184.   the root device name would change! I corrected this problem by
  185.   modifying the software in the kernel SCSI driver to scan the devices
  186.   in reverse order.
  187.  
  188.   Second, the distribution Linux kernel does not scan all SCSI LUNS.
  189.   The PD/CD drive has a mode that establishes the CD-ROM at LUN 1 and
  190.   the PD at LUN 0. This mode is selected by the configuration switches
  191.   on the PD/CD drive. Switch #2 should be down (off?). If this switch is
  192.   up (on?), the signature of the device is dependent upon the media that
  193.   is installed and it only reports this device on LUN 0. If no media is
  194.   installed I think it defaults to CD-ROM.  I am using an Future Domain
  195.   16-xx SCSI interface card and the software in Linux kernel driver
  196.   supports an optical device signature when scanning the LUNS. I assume
  197.   that this is standard for most of the SCSI drivers. I reconfigured the
  198.   kernel to enable the "scan all LUNS" switch. The kernel then assigns
  199.   different device names for each device. The following is an excerpt
  200.   from by boot log. You will note a series of errors in this log. This
  201.   is because I did not have the optical media installed in the drive and
  202.   the driver was attempting to look at the partition table to determine
  203.   the block size. Fortunately it defaults to 512. I am planning on
  204.   modifying the Future Domain SCSI driver to not do this when it detects
  205.   the optical device.
  206.  
  207.        >  scsi0 <fdomain>: BIOS version 3.2 at 0xde000 using scsi id 7
  208.        >  scsi0 <fdomain>: TMC-18C50 chip at 0x140 irq 12
  209.        >  scsi0 : Future Domain TMC-16x0 SCSI driver, version 5.28
  210.        >  scsi : 1 host.
  211.        >    Vendor: CONNER    Model: CP30545 545MB3.5  Rev: A9AF
  212.        >    Type:   Direct-Access                      ANSI SCSI revision: 02
  213.        >  Detected scsi disk sda at scsi0, id 6, lun 0
  214.        >    Vendor: MATSHITA  Model: PD-1 LF-1000      Rev: A109
  215.        >    Type:   Optical Device                     ANSI SCSI revision: 02
  216.        >  Detected scsi disk sdb at scsi0, id 4, lun 0
  217.        >    Vendor: MATSHITA  Model: PD-1 LF-1000      Rev: A109
  218.        >    Type:   CD-ROM                             ANSI SCSI revision: 02
  219.        >  Detected scsi CD-ROM sr0 at scsi0, id 4, lun 1
  220.        >  fdomain: Selection failed
  221.        >  scsi : detected 1 SCSI cdrom 2 SCSI disks total.
  222.        >  SCSI Hardware sector size is 512 bytes on device sda
  223.        >  fdomain: REQUEST SENSE Key = 2, Code = 3a, Qualifier = 0
  224.        >  last message repeated 3 times
  225.        >  sdb : READ CAPACITY failed.
  226.        >  sdb : status = 0, message = 00, host = 0, driver = 28
  227.        >  sdb : extended sense code = 2
  228.        >  sdb : block size assumed to be 512 bytes, disk size 1GB.
  229.        >  .
  230.        >  .
  231.        >  .
  232.        >  Partition check:
  233.        >    sda: sda1 sda2 sda3
  234.        >  scsidisk I/O error: dev 0810, sector 0
  235.        >    unable to read partition table of device 0810
  236.  
  237.   Third, I modified my file system table (/etc/fstab) to list each
  238.   device but do not attempt to auto mount when booting. I have included
  239.   an excerpt from my fstab. The most important options are the noauto,
  240.   rw(ro), and the checkpass flag.
  241.   To create a ext2 file system on the PD, I used the command "mkfs.ext2
  242.   -i 2048 /dev/sdb".
  243.  
  244.        # fstab - List of file systems
  245.        #
  246.        # device  mount   type          options              dumpfrequency
  247.        checkpass
  248.        /dev/sdb /optd    ext2   rw,user,suid,noauto,sync,exec,dev,umask=0 0 2
  249.        /dev/sr0 /dist  iso9660  ro,user,suid,noauto,sync,exec,dev 0 2
  250.  
  251.   After making these changes, I have had no problems with mounting
  252.   either media. All I need to do is to load the media and type "mount
  253.   /optd" or "mount /dist" and the system does all the rest.
  254.  
  255.   I hope this information is useful.
  256.  
  257.        Jeff
  258.        --
  259.        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  260.        \ Jeff Rooze -- http://www.treknet.net/~jrooze -- jrooze@treknet.net /
  261.        /  If builders built buildings the way some programmers write        \
  262.        \  programs, then the first woodpecker that came along would destroy /
  263.        /  civilization.                                     GERALD WEINBERG \
  264.        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  265.  
  266.   I tried Jeff's suggestion. Here are the steps I performed;
  267.  
  268.   ╖  Modify my kernel using "make xconfig" in the /usr/src/linux
  269.      directory and installed it.
  270.  
  271.   ╖  Change the mode jumper on the PD drive to non-DOS mode. I soldered
  272.      a switch across the mode jumper connections and routed it the the
  273.      back panel. I figured out which switch position was the open
  274.      position and labeled this one for DOS.  The other position is of
  275.      course Linux.  So before I boot my system I decide which OS I'll be
  276.      using and set the switch accordingly. History shows it staying in
  277.      the Linux position more and more.
  278.  
  279.   ╖  Reboot your system. You should now see multiple LUN show up during
  280.      boot for the PD SCSI device number - It works great!!! If you have
  281.      an older kernel modify the "/usr/src/linux/drivers/scsi/config.in"
  282.      file.
  283.  
  284.   ╖  Update the fstab for both CD and PD drives.
  285.  
  286.   ╖  Use appropriate mount command.
  287.  
  288.   ╖  "df" to make sure your ready.
  289.  
  290.   I did try moving my primary SCSI drive to 6 but experienced some
  291.   difficulties. Can't remember exactly what it was but it may have been
  292.   that my controller "Adaptec 1542" with "Corel SCSI" requires a
  293.   bootable disk and SCSI 0 for the BIOS install to work properly with
  294.   DOS. So I switched it back and enjoyed playing with my properly
  295.   install PD drive! With this configuration "workman" - the audio CD
  296.   player util - works fine.
  297.  
  298.   4.  Magneto Optical Technology
  299.  
  300.   4.1.  Introduction
  301.  
  302.   Magneto optical drives use a "Far field" magnetic field and a laser to
  303.   change polarization of a magnetic media. The media is of such a nature
  304.   that it must be heated to the appropriate temperature before a
  305.   polarization change can happen - this is where the laser come in. A
  306.   high power write laser is used to heat the disk surface to the
  307.   appropriate temperature at which time the "Far field" can set the
  308.   polarization on the disk magnetic surface. After a short period of
  309.   time the disk surface cools and "locks" the polarization into place.
  310.   The read back I'm a little fuzzy on - someone please send me the
  311.   proper wording.  I think a low power laser is used for read back and
  312.   the "H" field of the disk polarization interacts with the "E" and "H"
  313.   field of the incident laser to produce a reflective polarization which
  314.   will correspond to the disk bit polarization - I hope this is in the
  315.   ballpark, it's certainly no home run. Maybe a total strike out.
  316.  
  317.   The use of a laser for polarization change allows the disk bit and
  318.   track densities to be higher than conventional "Flying" magnetic
  319.   heads. The "far field" means no more "head crashes" - that is assuming
  320.   your disk label doesn't peal off during the load or you don't leave
  321.   one of those sticky pads on the disk cartridge. Most media allows 650
  322.   Megs per platter and on some models both sides of the media is used
  323.   yielding 1.3Gig storage media - you must remove the media and flip it
  324.   over to use the other 650Megs though.
  325.  
  326.   5.  Optical Jukeboxes
  327.  
  328.   I have no experience with optical jukeboxes with Linux!!!!  I have had
  329.   experiences with Optical Jukeboxes under HP-UX. In this setup the the
  330.   Jukebox had a SCSI address of it's own. Each slot in the Jukebox had
  331.   an associated LUN number. A device name was assigned for each disk
  332.   slot A side and B side. The mount command was run against the
  333.   appropriate device name. I had a Jukebox with just one drive and 16
  334.   optical disk slots - 20 Gig. I thought it was going to be a real
  335.   hassle to write a disk mount manager to share this drive among users
  336.   until I discovered you can mount as many disk as you want and the
  337.   Jukebox driver takes care of arbitration - what a nice feature.
  338.   Granted, you only want archive type data here and your overall system
  339.   configuration to be such that not too many processes will be accessing
  340.   the Jukebox at the same time. The disk spin down, carriage load,
  341.   carriage move, carriage unload, carriage move to the next disk,
  342.   carriage next disk load, carriage move, optical drive load, and spin
  343.   up takes about 12 seconds - "seek-from-hell".
  344.  
  345.